// 设置响应头的中间件
module.exports = async (ctx, next) => {
    const contentType = "application/json charset=UTF-8"
    // 设置请求头 数据类型
    ctx.set("Content-Type",contentType)

    // 设置跨域
    ctx.set("Access-Control-Allow-Origin","*")
    ctx.set("Access-Control-Allow-MethodS","OPTIONS,GET,POST,PUT,DELETE")

    await next()
}